package com.huang.clients;

import com.huang.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

//调用商品服务的openfeign
@FeignClient(value = "products") //要调用的属性名
public interface ProductClient {

    @GetMapping("/product/showMsg")
    String showMessage();

    @GetMapping("/product/showMsgTestGetParam")
    String showMessageGetParam(@RequestParam("msg") String msg);

    @PostMapping("/product/addProduct")
    Map<String,Object> addProduct(Product product);


}
